package com.xujp.cloud.controller;

import com.xujp.cloud.service.PaymentFeignService;
import com.xujp.common.entity.CommonResult;
import com.xujp.common.entity.Payment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Xjp
 * @version 1.0
 * @date 2021/5/2 下午 03:23
 */
@RestController
@RequestMapping("consumer")
public class PaymentFeignController {

    @Autowired
    private PaymentFeignService service;


    @PostMapping(value = "/feign/payment/query")
    public CommonResult<Payment> query() {
        return service.query();
    }

    @PostMapping(value = "/feign/payment/insert")
    public CommonResult<Payment> insert(Payment payment) {
        return service.insert(payment);
    }

    @PostMapping(value = "/feign/timeout")
    public String paymentFeignTimeOut()
    {
        return service.paymentFeignTimeOut();
    }



}
